package com.example.composite.demo.safe.tree;

/**
 * 叶子节点
 */
public class LeafNode extends  NodeComponent {

    private String name;

    public LeafNode(String name) {
        this.name = name;
    }

    @Override
    public void showInfo() {
        System.out.println(this.name);
    }
}
